@tailwind base;
@tailwind components;
@tailwind utilities;

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* 顶部导航栏 */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: bold;
    color: #2d3436;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    color: #667eea;
}

.logo span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 16px;
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #495057;
}

.search-input::placeholder {
    color: #adb5bd;
}

.search-btn {
    background: none;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: #667eea;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.header-actions .btn i {
    font-size: 12px;
}

.header-actions .btn:hover, 
.header-actions .btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 主要内容区域 */
.main {
    flex: 1;
    padding: 0;
}

.main-section {
    margin-bottom: 40px;
    min-height: calc(100vh - 200px);
    padding: 20px 0;
}

.main-content {
    display: flex;
    gap: 20px;
    align-items: stretch;
    max-width: 100%;
    overflow: hidden;
    min-height: 0;
}

.content-area {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 200px);
}

.sidebar-category {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.sidebar-category:last-child {
    margin-bottom: 0;
}

.sidebar-category:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(4px);
}

.sidebar-category:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 2px 2px 0;
}

.sidebar-category i {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sidebar-category:hover i {
    transform: scale(1.1);
}

.promo-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.main-promo-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.main-promo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.promo-bg {
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.promo-content {
    flex: 1;
    color: white;
    z-index: 2;
    position: relative;
}

.promo-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
}

.promo-content h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.promo-subtitle {
    font-size: 16px;
    margin-bottom: 24px;
    opacity: 0.9;
}

.promo-subtitle .highlight {
    color: #ffd700;
    font-weight: 600;
}

.promo-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.promo-cta-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.promo-decoration {
    position: relative;
    width: 200px;
    height: 200px;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 80px;
    height: 80px;
    top: 20px;
    right: 40px;
    animation-delay: 0s;
}

.circle-2 {
    width: 60px;
    height: 60px;
    top: 100px;
    right: 20px;
    animation-delay: 2s;
}

.circle-3 {
    width: 40px;
    height: 40px;
    top: 60px;
    right: 100px;
    animation-delay: 4s;
}

.promo-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: rgba(255,255,255,0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.category-card-modern {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--theme-color), var(--theme-color-light));
}

.category-card-modern.yellow-theme::before {
    --theme-color: #ffd700;
    --theme-color-light: #fff3cd;
}

.category-card-modern.blue-theme::before {
    --theme-color: #74b9ff;
    --theme-color-light: #d1ecf1;
}

.category-card-modern.green-theme::before {
    --theme-color: #55a3ff;
    --theme-color-light: #d4edda;
}

.category-card-modern.purple-theme::before {
    --theme-color: #a29bfe;
    --theme-color-light: #e2d9fd;
}

.category-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.category-icon-modern {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    background: linear-gradient(135deg, var(--theme-color), var(--theme-color-light));
}

.yellow-theme .category-icon-modern {
    --theme-color: #ffd700;
    --theme-color-light: #ffed4e;
}

.blue-theme .category-icon-modern {
    --theme-color: #74b9ff;
    --theme-color-light: #55a3ff;
}

.green-theme .category-icon-modern {
    --theme-color: #55a3ff;
    --theme-color-light: #74b9ff;
}

.purple-theme .category-icon-modern {
    --theme-color: #a29bfe;
    --theme-color-light: #6c5ce7;
}

.category-meta h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 4px;
}

.category-meta p {
    font-size: 14px;
    color: #636e72;
}

.product-showcase {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.product-mini {
    flex: 1;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
}

.product-mini:hover {
    background: rgba(102, 126, 234, 0.05);
}

.product-mini img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.product-mini:hover img {
    transform: scale(1.05);
}

.price-tag {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #e74c3c;
    background: #fdf2f2;
    padding: 4px 8px;
    border-radius: 6px;
    margin: 0 auto;
    width: fit-content;
    transition: all 0.3s ease;
}

.product-mini:hover .price-tag {
    background: #e74c3c;
    color: white;
}

.product-mini-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.product-mini-name {
    font-size: 11px;
    color: #636e72;
    font-weight: 500;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 推荐商品区域 */
.recommended-section {
    margin-top: 40px;
    flex: 1;
}

.recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.creative-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.header-decoration {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.sparkle {
    position: absolute;
    font-size: 20px;
    animation: sparkle 2s ease-in-out infinite;
}

.sparkle-1 { left: -40px; animation-delay: 0s; }
.sparkle-2 { left: 0px; animation-delay: 0.5s; }
.sparkle-3 { left: 40px; animation-delay: 1s; }

@keyframes sparkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.header-content {
    position: relative;
    z-index: 2;
}

.creative-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 12px;
}

.title-icon {
    font-size: 24px;
}

.title-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.creative-subtitle {
    font-size: 16px;
    color: #636e72;
    margin-bottom: 20px;
}

.header-accent {
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    margin: 0 auto;
}

/* 商品卡片 */
.product-card-new {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-card-new:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.product-image-new {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card-new:hover .product-image-new img {
    transform: scale(1.05);
}

.product-discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.product-info-new {
    padding: 20px;
}

.product-brand {
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-title-new {
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-new {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: #e74c3c;
}

.original-price {
    font-size: 14px;
    color: #bdc3c7;
    text-decoration: line-through;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.feature-tag {
    background: #f8f9fa;
    color: #636e72;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}

.product-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #95a5a6;
}

.sales-count {
    font-weight: 500;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.rating i {
    color: #f39c12;
    font-size: 10px;
}

/* 底部 */
.footer {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 20px 0;
    margin-top: auto;
}

.footer-bottom {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.footer-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #5a6fd8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 0 auto;
        padding: 0 20px;
    }
    
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }
    
    .search-box {
        margin: 0;
        max-width: none;
    }
    
    .main-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-section {
        min-height: auto;
        padding: 15px 0;
    }
    
    .category-sidebar {
        width: 100%;
        position: static;
        order: 2;
        margin-bottom: 20px;
        flex-shrink: 0;
        min-height: auto;
    }
    
    .content-area {
        order: 1;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: auto;
    }
    
    .promo-section {
        order: 1;
    }
    
    .promo-bg {
        padding: 30px 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .promo-content h3 {
        font-size: 24px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .product-showcase {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .product-mini {
        flex: 0 0 calc(50% - 4px);
    }
    
    .product-mini img {
        width: 50px;
        height: 50px;
    }
    
    .recommended-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .creative-title {
        font-size: 24px;
        flex-direction: column;
        gap: 8px;
    }
    
    .product-card-new {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 0 auto;
        padding: 0 15px;
    }
    
    .promo-bg {
        padding: 20px 15px;
    }
    
    .promo-content h3 {
        font-size: 20px;
    }
    
    .category-card-modern {
        padding: 20px;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .product-showcase {
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .product-mini {
        flex: 0 0 calc(50% - 3px);
    }
    
    .product-mini img {
        width: 45px;
        height: 45px;
    }
    
    .product-mini-name {
        font-size: 10px;
    }
    
    .price-tag {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .recommended-grid {
        gap: 16px;
    }
    
    .creative-header {
        margin-bottom: 30px;
    }
    
    .creative-title {
        font-size: 20px;
    }
    
    .product-card-new {
        margin-bottom: 16px;
    }
    
    .product-info-new {
        padding: 16px;
    }
    
    .product-title-new {
        font-size: 14px;
    }
    
    .current-price {
        font-size: 16px;
    }
    
    .feature-tag {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .product-stats {
        font-size: 11px;
    }
}
